package com.mantru.iotpot.dao;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Environment;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * 通用配置表
 * 作者： cmh
 * 日期： 2022/12/19
 */

public class t_public_config
{
    public String table_name = "t_public_config";
    public String config_id = "1", device_param_001, device_param_002, device_param_003, device_param_004, device_param_005, device_param_006,device_param_007,device_param_008,device_param_009,device_param_010,device_param_011, tts_param_001, tts_param_002, tts_param_003, tts_param_004, tts_param_005, tts_param_006, update_time;
    public String create_sql = "create table t_public_config(config_id integer primary key, device_param_001 text, device_param_002 text, device_param_003 text, device_param_004 text, device_param_005 text, device_param_006 text, device_param_007 text, device_param_008 text, device_param_009 text, device_param_010 text, device_param_011 text, tts_param_001 text, tts_param_002 text, tts_param_003 text, tts_param_004 text, tts_param_005 text, tts_param_006 text, update_time text)";
    public String drop_sql = "drop table t_public_config";
    public String delete_sql = "delete from t_public_config ";
    public String list_sql = "select * from t_public_config where config_id=1 ";
    public String update_sql = "update t_public_config set tts_param_001=?, tts_param_002=?, tts_param_003=?, tts_param_004=?, tts_param_005=?, tts_param_006=?, device_param_006=?, update_time=? where config_id=? ";

    public String[] GetDeleteValues()
    {
        String[] values = new String[0];
        return values;
    }

    public String[] GetListValues()
    {
        String[] values = new String[0];
        return values;
    }

    public ContentValues GetInsertContentValues()
    {
        ContentValues cv = new ContentValues();
        cv.put("config_id", config_id);
        cv.put("device_param_001", device_param_001);
        cv.put("device_param_002", device_param_002);
        cv.put("device_param_003", device_param_003);
        cv.put("device_param_004", device_param_004);
        cv.put("device_param_005", device_param_005);
        cv.put("device_param_006", device_param_006);
        cv.put("device_param_007", device_param_007);
        cv.put("device_param_008", device_param_008);
        cv.put("device_param_009", device_param_009);
        cv.put("device_param_010", device_param_010);
        cv.put("device_param_011", device_param_011);
        cv.put("tts_param_001", tts_param_001);
        cv.put("tts_param_002", tts_param_002);
        cv.put("tts_param_003", tts_param_003);
        cv.put("tts_param_004", tts_param_004);
        cv.put("tts_param_005", tts_param_005);
        cv.put("tts_param_006", tts_param_006);
        cv.put("update_time", update_time);
        return cv;
    }

    public String[] GetUpdateValues()
    {
        String[] values = new String[9];
        values[0] = tts_param_001;
        values[1] = tts_param_002;
        values[2] = tts_param_003;
        values[3] = tts_param_004;
        values[4] = tts_param_005;
        values[5] = tts_param_006;
        values[6] = device_param_006;
        values[7] = update_time;
        values[8] = config_id;
        return values;
    }

}
